package com.waterwolf.wolfbot.internal.input;

import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;

public abstract class MouseInput implements MouseListener, MouseMotionListener, MouseWheelListener {
    
    public static Point mouseLoc = null;

    public abstract void _mouseClicked(MouseEvent e);

    public abstract void _mouseDragged(MouseEvent e);

    public abstract void _mouseEntered(MouseEvent e);

    public abstract void _mouseExited(MouseEvent e);

    public abstract void _mouseMoved(MouseEvent e);

    public abstract void _mousePressed(MouseEvent e);

    public abstract void _mouseReleased(MouseEvent e);

    public abstract void _mouseWheelMoved(MouseWheelEvent e);

    //public abstract Component getComponent();
    
    @Override
    public void mouseClicked(final MouseEvent arg0) {
        
        System.out.println("mous clicked");
        
        _mouseClicked(arg0);
        
        arg0.consume();
    }

    @Override
    public void mouseEntered(final MouseEvent arg0) {
        _mouseEntered(arg0);
        arg0.consume();
    }

    @Override
    public void mouseExited(final MouseEvent arg0) {
        _mouseExited(arg0);
        arg0.consume();
    }

    @Override
    public void mousePressed(final MouseEvent arg0) {
        _mousePressed(arg0);
        arg0.consume();
    }

    @Override
    public void mouseReleased(final MouseEvent arg0) {
        _mouseReleased(arg0);
        arg0.consume();
    }

    @Override
    public void mouseDragged(final MouseEvent arg0) {
        _mouseDragged(arg0);
        arg0.consume();
    }

    @Override
    public void mouseMoved(final MouseEvent arg0) {
        MouseInput.mouseLoc = arg0.getPoint();
        _mouseMoved(arg0);
        arg0.consume();
    }

    @Override
    public void mouseWheelMoved(final MouseWheelEvent arg0) {
        _mouseWheelMoved(arg0);
        arg0.consume();
    }

}
